<?php

use Biz\Constants\Notify\NotifyConstants;
use Biz\Constants\Pay\PayConstants;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * Notify.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class Notify extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('notify', function (Blueprint $table) {
            $table->bigIncrements('id');//BigID unsigned
            $table->string('type', 32)->default(NotifyConstants::TYPE_SITE);// 类型，如网站通知
            $table->string('gateway', 32)->default(PayConstants::GATEWAY_PAY_EASE);// 支付网关如支付宝、微信
            $table->string('driver', 32)->default(PayConstants::DRIVER_PAY_EASE_ONLINE_PAY);// 支付驱动如支付宝PC支付、微信APP支付
            $table->tinyInteger('status')->default(NotifyConstants::STATUS_NORMAL);// 状态

            // 注意时间戳位数
            $table->timestamps();
            $table->softDeletes();

            // index
            //$table->unique('order_no');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('notify');
    }
}